package com.ruoyi.swap.realtime.transactionrecord.service.impl;

import java.util.List;

import com.ruoyi.swap.realtime.transactionrecord.domain.VO.SwapTransactionRecordRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.swap.realtime.transactionrecord.mapper.SwapTransactionRecordRealtimeDataMapper;
import com.ruoyi.swap.realtime.transactionrecord.domain.SwapTransactionRecordRealtimeData;
import com.ruoyi.swap.realtime.transactionrecord.service.ISwapTransactionRecordRealtimeDataService;

/**
 * 实时获取成交记录Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-07
 */
@Service
public class SwapTransactionRecordRealtimeDataServiceImpl implements ISwapTransactionRecordRealtimeDataService 
{
    @Autowired
    private SwapTransactionRecordRealtimeDataMapper swapTransactionRecordRealtimeDataMapper;

    /**
     * 查询实时获取成交记录
     * 
     * @param id 实时获取成交记录主键
     * @return 实时获取成交记录
     */
    @Override
    public SwapTransactionRecordRealtimeDataVO selectSwapTransactionRecordRealtimeDataById(Integer id)
    {
        return swapTransactionRecordRealtimeDataMapper.selectSwapTransactionRecordRealtimeDataById(id);
    }

    /**
     * 查询实时获取成交记录列表
     * 
     * @param swapTransactionRecordRealtimeData 实时获取成交记录
     * @return 实时获取成交记录
     */
    @Override
    public List<SwapTransactionRecordRealtimeDataVO> selectSwapTransactionRecordRealtimeDataList(SwapTransactionRecordRealtimeDataVO swapTransactionRecordRealtimeData)
    {
        return swapTransactionRecordRealtimeDataMapper.selectSwapTransactionRecordRealtimeDataList(swapTransactionRecordRealtimeData);
    }

    /**
     * 新增实时获取成交记录
     * 
     * @param swapTransactionRecordRealtimeData 实时获取成交记录
     * @return 结果
     */
    @Override
    public int insertSwapTransactionRecordRealtimeData(SwapTransactionRecordRealtimeData swapTransactionRecordRealtimeData)
    {
        return swapTransactionRecordRealtimeDataMapper.insertSwapTransactionRecordRealtimeData(swapTransactionRecordRealtimeData);
    }

    /**
     * 修改实时获取成交记录
     * 
     * @param swapTransactionRecordRealtimeData 实时获取成交记录
     * @return 结果
     */
    @Override
    public int updateSwapTransactionRecordRealtimeData(SwapTransactionRecordRealtimeData swapTransactionRecordRealtimeData)
    {
        return swapTransactionRecordRealtimeDataMapper.updateSwapTransactionRecordRealtimeData(swapTransactionRecordRealtimeData);
    }

    /**
     * 批量删除实时获取成交记录
     * 
     * @param ids 需要删除的实时获取成交记录主键
     * @return 结果
     */
    @Override
    public int deleteSwapTransactionRecordRealtimeDataByIds(Integer[] ids)
    {
        return swapTransactionRecordRealtimeDataMapper.deleteSwapTransactionRecordRealtimeDataByIds(ids);
    }

    /**
     * 删除实时获取成交记录信息
     * 
     * @param id 实时获取成交记录主键
     * @return 结果
     */
    @Override
    public int deleteSwapTransactionRecordRealtimeDataById(Integer id)
    {
        return swapTransactionRecordRealtimeDataMapper.deleteSwapTransactionRecordRealtimeDataById(id);
    }

    @Override
    public List<SwapTransactionRecordRealtimeDataVO> selectSwapAllData() {
        return swapTransactionRecordRealtimeDataMapper.selectSwapAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return swapTransactionRecordRealtimeDataMapper.queryCurryNumber(currencyPair);
    }
}
